cmake_minimum_required(VERSION 3.17)
project(TEMU C)

set(CMAKE_C_STANDARD 11)

include_directories(loongarch_sc/include)
include_directories(temu/include)
include_directories(temu/include/cpu)
include_directories(temu/include/memory)
include_directories(temu/include/monitor)

add_executable(TEMU
        loongarch_sc/include/regdef.h
        loongarch_sc/include/trap.h
        loongarch_sc/convert.c
        temu/include/cpu/3r-type.h
        temu/include/cpu/all-instr.h
        temu/include/cpu/helper.h
        temu/include/cpu/i12-type.h
        temu/include/cpu/i20-type.h
        temu/include/cpu/operand.h
        temu/include/cpu/reg.h
        temu/include/cpu/special.h
        temu/include/memory/burst.h
        temu/include/memory/memory.h
        temu/include/monitor/expr.h
        temu/include/monitor/monitor.h
        temu/include/monitor/watchpoint.h
        temu/include/common.h
        temu/include/debug.h
        temu/include/macro.h
        temu/include/misc.h
        temu/include/temu.h
        temu/src/cpu/3r-type.c
        temu/src/cpu/exec.c
        temu/src/cpu/i12-type.c
        temu/src/cpu/i20-type.c
        temu/src/cpu/reg.c
        temu/src/cpu/special.c
        temu/src/memory/dram.c
        temu/src/memory/memory.c
        temu/src/monitor/cpu-exec.c
        temu/src/monitor/expr.c
        temu/src/monitor/monitor.c
        temu/src/monitor/ui.c
        temu/src/monitor/watchpoint.c
        temu/src/main.c
        temu/include/param.h
        temu/src/cpu/off16-type.c
        temu/include/cpu/off16-type.h
        temu/src/cpu/ddr-type.c
        temu/include/cpu/ddr-type.h
        temu/include/monitor/trace.h
        temu/src/monitor/trace.c
)
